import { Select } from "antd"
import { FC } from "react"

import { SFormItem } from "@/components/common"
import { useLocale } from "@/locales"

const StatusSelect: FC<{ isHideLabel?: boolean; width?: number }> = ({ isHideLabel = false, width = 200 }) => {
	const { newFormat } = useLocale()

	const options = [
		{
			value: 0,
			label: "未开始"
		},
		{
			value: 1,
			label: "进行中"
		},
		{
			value: 2,
			label: "已结束"
		}
	]

	return (
		<SFormItem name="status" label={isHideLabel ? "" : newFormat("dxn.card_ables_list.table_state")}>
			<Select
				allowClear
				placeholder={newFormat("dxn.card_ables_list.table_state_placeholder")}
				options={options}
				style={{ width: width }}
				mode="multiple"
			/>
		</SFormItem>
	)
}

export default StatusSelect
